/**
 * @file mainStore
 * @author wangshaozhi(wangshaozhi@baidu.com)
 */

import {action, makeObservable} from 'mobx';
import {ArticleStore} from './articleStore';
import {SideBarStore} from './sideBarStore';

export class MainStore {
    /** 文章store */
    articleStore: ArticleStore = new ArticleStore();

    /** 侧边栏store */
    sideBarStore: SideBarStore = new SideBarStore();

    constructor() {
        makeObservable(this, {
        });
    };

    update = action((data: Partial<MainStore>) => {
        Object.assign(this, data);
    });
}